<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="utf-8"/>
    <title>z-index_CSS参考手册_web前端开发参考手册系列</title>
    <meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com"/>
    <style>
        .z1,
        .z2,
        .z3 {
            position: absolute;
            width: 200px;
            height: 100px;
            padding: 5px 10px;
            color: #fff;
            text-align: right;
        }

        .z1 {
            z-index: 1;
            background: #000;
        }

        .z2 {
            z-index: 2;
            top: 30px;
            left: 30px;
            background: #C00;
        }

        .z3 {
            z-index: 3;
            top: 60px;
            left: 60px;
            background: #999;
        }
    </style>
</head>
<body>
<div class="z1">z-index:1</div>
<div class="z2">z-index:2</div>
<div class="z3">z-index:3</div>
</body>
</html>
